#! /usr/bin/python3

import sys

if len(sys.argv) < 3:
    print("USAGE: ", sys.argv[0], '源文件路径', '目标文件路径')
    sys.exit(-1)  # 退出程序

try:
    with open(sys.argv[1], 'rb') as fr:
        with open(sys.argv[2], 'wb') as fw:
            # 开始复制文件
            while True:
                b = fr.read(8192)
                if b == b'':
                    break
                fw.write(b)
except:
    print('复制文件失败！')